# Contributor: Jan Hustak <coding@journey.sk>
# Maintainer:
pkgname=xvkbd
pkgver=4.1
pkgrel=2
pkgdesc="The xvkbd virtual keyboard for X11"
url="http://t-sato.in.coocan.jp/xvkbd/"
arch="all !riscv64" # imake does not support riscv64
license="GPL-2.0-or-later"
options="!check" # No test suite
makedepends="imake xorg-server-dev libxt-dev libxmu-dev
	libxaw-dev libxtst-dev xorg-cf-files"
subpackages="$pkgname-doc"
source="http://t-sato.in.coocan.jp/xvkbd/xvkbd-$pkgver.tar.gz
	10-remove-dependency-on-Xaw3d.patch
	20-remove-icon-mask.patch
	xvkbd.desktop
	xvkbd.png"

build() {
	xmkmf
	sed -i 's/\$(DESTDIR) \$(SHAREDIR)/$(DESTDIR)$(SHAREDIR)/' Makefile
	make
}

package() {
	mkdir -p "$pkgdir"/usr/share/X11

	make DESTDIR="$pkgdir" install
	make MANPATH=/usr/share/man DESTDIR="$pkgdir" install.man
	install -Dm644 "$srcdir"/xvkbd.desktop \
		"$pkgdir"/usr/share/applications/xvkbd.desktop
	install -Dm644 "$srcdir"/xvkbd.png \
		"$pkgdir"/usr/share/icons/xvkbd.png
	rm "$pkgdir"/usr/lib/X11/app-defaults

}

sha512sums="
6a27a659bacc0f78d70c0afab7ae0f6301f0e7f0c9ed12c581fb4fd5040791536aed50c82ccbd703377244156aade80136567276193f2789a23f05c341b6c0e9  xvkbd-4.1.tar.gz
1cce82ed48fa93f2df4743513d50efccee5494b22b7ced38d198dc2b566d0c251718ef2e05426201236684c0f63bb27b4d164c36eecd4008cd456a203c85b7f1  10-remove-dependency-on-Xaw3d.patch
e8b265856c3152c231cbded838d1585b57cdca6c53654d72781e52aed7e8d18650202db046497699e47384b0a96deb99521eed4693d1e30757938d08fb2e1e68  20-remove-icon-mask.patch
bd7fbcb8eb0aa9f928048ad94737ed02fcd07c29d4c85371cc32e6c05011252c073b41ea4b6e78294131c0926d84b707a0febb2c214391a46682cd16d8080a23  xvkbd.desktop
c4465298fab7fdce048d238b949078f0ad3b9f5d8a8b0cbb7424a8877824e188637e37c883805c1a611bec75e3d0855af20675b7a98367d15e9093670cf71cf5  xvkbd.png
"
